#pragma once
#include "Common.h"
#include "DeviceUserBase.h"
#include <d3d11.h>
#include <string>
#include "Resource.h"


namespace Display
{
	class ResourcePool;
	class EXPORT Texture : public DeviceUserBase,public Resource
	{
		ID3D11ShaderResourceView * resView;

		Texture(ResourcePool * pool);

		friend class ResourcePool;

		~Texture(void);
		static Texture  * Create(ID3D11Device * device,ResourcePool * pool);

		void OnZeroRefReach();

	public:
		
		
		 void LoadFromFile(std::string fileName);
		
		 ID3D11ShaderResourceView * GetApiResource();
	};
}
